<!DOCTYPE html>
<html>
<head>
	<title>vue实例</title>
	<meta charset="utf-8">
	<script type="text/javascript" src="./js/vue.js"></script>
</head>
<body>
	<div id="root">
		<div v-on:click="handleClick">
			{{message}}
			
		</div>
		<item></item>
	</div>

</body>
<script type="text/javascript">


	Vue.component("item",{
		template:"<div>hello word</div>"
	})
	var vm = new Vue({
		el:"#root",
		data:{
			message:"hello word"
		},
		methods:{
			handleClick:function() {
				alert(this.message);
			}
		}
	})
</script>
</html>